import request from '@/utils/request'

// 查询分装预排产计划列表
export function listPackagingPreSchedulingPlan(query) {
  return request({
    url: '/sales/packagingPreSchedulingPlan/list',
    method: 'get',
    params: query
  })
}

// 查询分装预排产计划详细
export function getPackagingPreSchedulingPlan(id) {
  return request({
    url: '/sales/packagingPreSchedulingPlan/' + id,
    method: 'get'
  })
}

// 查询分装正式排产计划详细
export function formalProduction(id) {
  return request({
    url: '/sales/packagingPreSchedulingPlan/formalProduction/' + id,
    method: 'get'
  })
}

// 新增分装预排产计划
export function addPackagingPreSchedulingPlan(data) {
  return request({
    url: '/sales/packagingPreSchedulingPlan',
    method: 'post',
    data: data
  })
}

// 修改分装预排产计划
export function updatePackagingPreSchedulingPlan(data) {
  return request({
    url: '/sales/packagingPreSchedulingPlan',
    method: 'put',
    data: data
  })
}

// 删除分装预排产计划
export function delPackagingPreSchedulingPlan(id) {
  return request({
    url: '/sales/packagingPreSchedulingPlan/' + id,
    method: 'delete'
  })
}
